<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      /* 下面我们会解释这些 class 是做什么的 */
      /* .abc-enter-active,
      .abc-leave-active {
        transition: opacity 0.5s ease;
      }

      .abc-enter-from,
      .abc-leave-to {
        opacity: 0;
      } */

      .abc-enter-active,
      .abc-leave-active {
        transition: all 1s ease;
      }

      .abc-enter-from {
        opacity: 0;
        transform: translateX(-200px);
      }
      .abc-leave-to {
        opacity: 0;
        transform: translateX(200px);
      }
    </style>
  </head>
  <body>
    <div id="app">
      <button @click="show = !show">btn</button>
      <transition name="abc">
        <div v-if="show">123</div>
      </transition>
    </div>

    <script src="./vue.js"></script>
    <script>
      Vue.createApp({
        data() {
          return {
            show: true,
          };
        },
      }).mount("#app");
    </script>
  </body>
</html>
